<template>
  <FormView>
    <CodeMirrorEditor ref="editor" v-model="code" />
  </FormView>
</template>

<script>
  import '@web-utils/component/code-mirror-editor/style.css'

  export default {
    name: 'CodeMirrorDemo',
    components: { CodeMirrorEditor: () => import('@web-utils/component/code-mirror-editor') },
    data() {
      return {
        code: '{"rules": [{"field": "model.ouFullCode", "op": "likeRight", "value": 1 },{"field": "model.ouFullCode", "op": "eq", "value": 2}], "op": "or"}'
      }
    }
  }
</script>
